package org.swim.remote.manager;

import javax.ejb.Remote;
import javax.naming.NamingException;

import net.sf.json.JSONObject;

import org.swim.remote.entities.IFriendship;
import org.swim.remote.exceptions.FriendshipException;
import org.swim.remote.exceptions.SwimException;
import org.swim.remote.exceptions.TokenException;

@Remote
public interface FriendshipManagerRemote extends SwimEntityManager<IFriendship>{

	 /**
	  * {
	  * 	token: "..."
	  * 	receiverUserId: "..."
	  * } 
	  * @param object
	  * @return
	  * @throws TokenException
	  * @throws FriendshipException 
	 * @throws NamingException
	 * @throws SwimException 
	  */
	public abstract IFriendship requestFriendship(JSONObject object) throws TokenException, FriendshipException, NamingException, SwimException;

	 /**
	  * {
	  * 	token: "..."
	  * 	friendshipId: "..."
	  * 	status: "..."
	  * } 
	  * @param object
	  * @return
	  * @throws TokenException
	 * @throws FriendshipException 
	  */
	public abstract IFriendship setStatusFriendship(JSONObject object) throws TokenException, FriendshipException;
	
	/**
	 * {
	 * 	token: "..."
	 *  id: "..."
	 * 	status: "READ" or "HIDDEN"
	 * }
	 * @param object
	 * @return 
	 * @throws TokenException 
	 * @throws FriendshipException 
	 */
	public IFriendship setStatusFriendshipNotification(
			JSONObject object) throws TokenException,FriendshipException;
	
}
